//
//  GFScan.h
//  GoFactory
//
//  Created by wtb on 2017/12/22.
//  Copyright © 2017年 KQZK. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GFScan : NSObject
/**
 *  开始扫码
 */
-(void)start;

/**
 *  停止扫码
 */
-(void)stop;

/**
 *  开始会话
 */
-(void)setupCamera;

/// 创建扫码
/// - Parameters:
///   - preView: 加载的view
///   - isSupportBarcode: 是否支持扫条形码
///   - result: 回调
-(instancetype)initWithPreView:(UIView *)preView isSupportBarcode:(BOOL)isSupportBarcode success:(void(^)(NSString *value,NSString *type))result;

/// 切换扫码类型
-(void)changeScanMetaTypes:(BOOL)isQr;

/**
 *  识别图片
 */
+(void)recognizeImage:(UIImage*)image success:(void(^)(NSArray *))block;

/**
 *  生成二维码
 */
+(UIImage*)createQRWithString:(NSString*)text QRSize:(CGSize)size;
@end
